<template>
  <div class="ml">
      <div class="radio_list" v-for="items in rglist" :key="items.picUrl">
        <a>
            <div class="list_pic"><img :src="items.picUrl"></div>
            <div class="list_info">
                <span class="list_tit">热歌</span>
				<p class="list_text">风吹草动</p>
            </div>
        </a>
    </div>
  </div>
</template>

<script>
    import axios from "axios"
    export default{
        data(){
            return{
                rglist:""
            }
        },
        mounted(){//使用箭头函数
            axios.get('https://www.easy-mock.com/mock/5aab25e6e80e0d51a5160fb3/music/data').then((response)=>{
                // this.sli = JSON.parse(response.data.data.slider);
                this.rglist = response.data.data.songList;
                // console.log(response.data.data.radioList);
                console.log(this.rglist);
            }).catch(function (error) {
                console.log(error);
            });
        }
    }
</script>


<style lang="scss" scoped>
    .ml{
        .radio_list{
            margin-bottom: r(10px);
            a{
               .list_info{
                    padding-bottom: r(6px);
                    .list_tit{
                        display: block;
                        overflow: hidden;
                        text-overflow: ellipsis;
                        white-space: nowrap;
                    }
                    .list_text{
                        font-size: 0.4rem;
                    }
                } 
            }
            
        }
        
    }
</style>
